<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
    "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
<html><head>
    <title>NKDAbstractUPCEANBarcode</title>
	<meta name="generator" content="HeaderDoc">
</head><body bgcolor="#ffffff"><h1><font face="Geneva,Arial,Helvtica">NKDAbstractUPCEANBarcode</font></h1><hr><br>
<h2>Discussion</h2>
This abstract class holds all the functionality shared by UPC-A, UPC-E, EAN-13 and EAN-8
 <hr><br><h2>Methods</h2>

<h3><a name="_encodeChar">_encodeChar</a></h3>
<b>Abstract:</b> Simple encoding scheme that returns a 7 character string

<blockquote><pre><tt>- (NSString *)<B>_encodeChar:</B>(char)<I>inChar;</I> </tt><br>
</pre></blockquote>
<p>This routine returns the left-hand odd encoding. Either the handedness or parity can be converted using
the routines _swapParity: and _swapHandedness
</p>
<b>Result:</b> String of 0s and 1s representing this character

<hr>

<h3><a name="barBottom:">barBottom:</a></h3>
<b>Abstract:</b> Overridden to specify that guard bars, terminator and initiator should extend down into the caption area

<blockquote><pre><tt>- (float)<B>barBottom:</B>(int)<I>index;</I> </tt><br>
</pre></blockquote>
<p></p>
<h4>Parameters</h4>
<blockquote>
<table border="1"  width="90%">
<thead><tr><th>Name</th><th>Description</th></tr></thead>
<tr><td align="center"><tt>index</tt></td><td>The index of the bar that you want to find the bottom for (assuming origin at lower left) as an index of
completeBarcode</td></tr>
</table>
</blockquote>
<b>Result:</b> Bottom of the bar specified in inches * kScreenResolution

<hr>

<h3><a name="calculateWidth">calculateWidth</a></h3>
<b>Abstract:</b> Overridden to provide extra space to the left and right needed for printing first and last characters
 
<blockquote><pre><tt>- (void)<B>calculateWidth;</B> </tt><br>
</pre></blockquote>
<p></p>
<hr>

<h3><a name="digitsToLeft">digitsToLeft</a></h3>
<b>Abstract:</b> Overridden to specify that one character of the caption prints to the left of the barcode

<blockquote><pre><tt>- (int)<B>digitsToLeft;</B> </tt><br>
</pre></blockquote>
<p></p>
<b>Result:</b> 1

<hr>

<h3><a name="digitsToRight">digitsToRight</a></h3>
<b>Abstract:</b> Overridden to specify that one character of the caption prints to the right of the barcode

<blockquote><pre><tt>- (int)<B>digitsToRight;</B> </tt><br>
</pre></blockquote>
<p></p>
<b>Result:</b> 1

<hr>

<h3><a name="firstBar">firstBar</a></h3>
<b>Abstract:</b> Overridden to set a first bar position indented in from the left to provide room for the first digit

<blockquote><pre><tt>- (float)<B>firstBar;</B> </tt><br>
</pre></blockquote>
<p></p>
<b>Result:</b> A value that is 10% of the total width. The total width is calculated at 120% needed to hold the barcode.

<hr>

<h3><a name="initiator">initiator</a></h3>
<b>Abstract:</b> Returns start character for UPC-A

<blockquote><pre><tt>- (NSString *)<B>initiator;</B> </tt><br>
</pre></blockquote>
<p></p>
<b>Result:</b> "101" The start and end character for UPC / EAN

<hr>

<h3><a name="lastBar">lastBar</a></h3>
<b>Abstract:</b> Overridden to set a last bar position indented from the right to provide room for the check digit.

<blockquote><pre><tt>- (float)<B>lastBar;</B> </tt><br>
</pre></blockquote>
<p></p>
<b>Result:</b> A value that is 90% of the total width. The total width is calculated at 120% needed to hold the barcode.

<hr>

<h3><a name="rightCaption">rightCaption</a></h3>
<b>Abstract:</b> Overridden to specify that the check digit prints to the right of the caption

<blockquote><pre><tt>- (NSString *)<B>rightCaption;</B> </tt><br>
</pre></blockquote>
<p></p>
<b>Result:</b> The check digit wrapped in an NSString *

<hr>

<h3><a name="terminator">terminator</a></h3>
<b>Abstract:</b> Returns end character for UPC or EAN barcode

<blockquote><pre><tt>- (NSString *)<B>terminator;</B> </tt><br>
</pre></blockquote>
<p></p>
<b>Result:</b> "101" The start and end character for UPC / EAN

<hr>
<p>(Last Updated 4/21/2003)
</p></body></html>
